<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>软件/游戏数据路径的工具</title>
</head>
<body>
    <input type="text" placeholder="请输入系统用户名">
    <input type="text" placeholder="请输入软件/游戏名称">
    <input type="text" placeholder="请输入游戏引擎/厂商名称，如果未知请直接回车">
    <button onclick="gen()">生成路径</button>
    <script>
        function createP(textContent)
        {
            const newElement = document.createElement("p")
            newElement.textContent = textContent
            document.body.appendChild(newElement)
        }
    function gen()
    {
        const allInputs = document.getElementsByTagName("input")
        const user_name = allInputs.item(0).value
        const name = allInputs.item(1).value
        const engine_or_factory = allInputs.item(2).value
        createP("可能的路径有：")
        if(engine_or_factory == "")
        {
            createP(`C:/Users/${user_name}/AppData/Roaming/${name}`)
            createP(`C:/Users/${user_name}/AppData/Local/${name}`)
        }
        else{
            createP(`C:/Users/${user_name}/AppData/Roaming/${engine_or_factory}/${name}`)
            createP(`C:/Users/${user_name}/AppData/Local/${engine_or_factory}/${name}`)
            createP(`C:/ProgramData/${engine_or_factory}/${name}`)
            if(engine_or_factory == "minori")
            {
                createP(`C:/Users/${user_name}/Documents/${engine_or_factory}/${name}`)
            }
            if(engine_or_factory == "tyranobuilder")
            {
                createP(`C:/Users/${user_name}/AppData/Local/tyranoscript/Local Stotage`)
                createP(`C:/Users/${user_name}/AppData/Roaming/tyranogame`)
            }
        }

    }</script>
</body>
</html>